import request from '@/utils/request'
/**
 * @param {mobile,password} data {modile, password}
 * @return
 */
export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}
/**
 * 获取用户信息
 * @returns
 */
// export function getUserProfile(token) {
//   return request({
//     url: '/sys/profile',
//     method: 'post'
//   })
// }
export const getUserProfile = () => request.post('/sys/profile')
/**
 * 获取用户信息
 * @returns
 */
// export function getUserByIdDetail(id) {
//   return request({
//     url: `/sys/user/${id}`,
//     method: 'get'
//   })
// }
export const getUserByIdDetail = id => request.get(`/sys/user/${id}`)

// 获取用户详情信息
export const getUserDetailById = id => request.get(`/sys/user/${id}`)

